package ch.zbw.timeline.presentation.event;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

/**
 * KeyListener for the time components in the time recording panel
 * 
 * @author Daniel Stefanovic
 * @version 18.01.2012
 * 
 */
public class TimeKeyListener implements KeyListener {

	public void keyTyped(KeyEvent e) {
		char c = e.getKeyChar();
		if (((c < '0') || (c > '9')) && (c != ':') && (c != KeyEvent.VK_BACK_SPACE)) {
			e.consume(); // ignore event
		}
	}

	public void keyPressed(KeyEvent e) {
	}

	public void keyReleased(KeyEvent e) {
	}

}
